Fixed many bugs, this version MAY work