Fixes on empty context support and selectOne function.