Bugs from previous commit solved.