fix template
changed loading script logic