synced with mannings fixes from 31cab48b07000b4cf51df69637fab2741b1c188e