Fixes some broken behavior