fixed operator popping, added syntax exceptions