\o/ most if not all bugs fixed

Signed-off-by: ShadowChild <shadychild12@gmail.com>