fixing spinner bug