Fixed swithcing between shapes andsome other things