Added early function exit to prevent error
Fixed error message