fixing some problmes