Another fix for the last commit, I should probably add proper testing...............