Various bug fixes by @zakrot
4.5.3 + contributions update