Fixed last commit and added test