fixed many problems