Added synthetic frame at the bottom of each stack piece.
Added logging to help find problem on travis.
Fixed (hopefully) undefined value issue.