fix problem when using different layout and view path