Fixing return type of method to use the correct type