fixes a bug i found