attempt at fixing weird return error