fixed many compiler warnings