Fix ordering of scripts