Fixed Many bugs