Fixed various parser bugs.