Fix parser bug assigning image ids