Fixes more bugs