Fixed some 'null' classname problems
Fixed some edge cases in page layout