fixes in alex state machine, malloc and memcpy when alimage is convertet to mat
missing semicolon added