fix error in layout()

calling layout() was throwing an error. variable viewPath should be layoutPath