Fixes some immediate bugs.