fixed much bugs