Fixed bug with multiple returns