Removed script from dialog template which caused a error at page loading