Added scaling tests. Found bug.