Fix issues with empty selector
Update tests