A couple af bug fixes.
Merge branch 'stack-bugs'

* stack-bugs:
  A couple af bug fixes.