Fixed bug with incorrect return.