bug fixes

there are still bugs to fix