Missing return was causing nil pointer error.