Fixed multiple warnings