Fixed some issues with commit 559411d.