still trying to prevent null painting