fix bug with findById returning arrays