fixed some stalling and compiling issues, still needs work