fix bug when returning single values