Fixed all bugs and compatibility finally