Added missing return statement

This was causing two errors to be trown instead just one.