Fixes which leverage @havocp's sanity