Fixed a missing return variable error