fixed basic errors
(what else should be added to the IR stuff?)