fixes. Special thanks to MWIsBest