huge commit to fix bugs