Fixing errors with testing