Fix a few more bugs. Still hopelessly lost oh god.