fix bug on space plotting