fixed strict and warning errors