Fix bug pointed out by @Fishrock123
changes