some fixes, in theory this is correct but I have some issue with GPIO