bug in selectById