This fixed some weird bugs