Fixing quite a few things