Corrected few small bugs