Fixed a gate issue + GUI work