put custom flags properly (ugly patch)