20140907_Bugs

Fixed bugs with the new code.