fixing problems from being too lazy to double check my jquery syntax