fixing the bug with OBJECT mode setting where there is no object in the scene