added space switching awareness