fixing errors... see previous commit for unofficial TODO