fixed loading issues, added end command