Merge pull request #1413 from ZappoMan/bugfixes

CR feedback and remove debug