Moved google api script tag to layout to fix javascript error