TRAP fixes

- Fixed TRAP energy scaling
- Fixed out of memory error