fixed more bugs with parsing