fixed parth's bugs