fix bugs on warning level