Gateway comunication fixed, bugs fixed