Fixed bugs from previous commits.