Bug fixes

Temporary data passing introduced [change later]