fixes memory bug, still no map