Fixed Serveral errors