fixed many issues