Fixed and tests added!