Fixes some issues