Fix several issues regarding the selector API when passing in a context