Fix bug that was causing page to crash
Update to layout template