Several bug fixes!

- These were bad bugs
- There might be more, things still are not working
another bug in apply.

- Things might actually be working now.