Fixed multiple issues