remove space before ]