finally fixed gesture parsing and registration logic :P