Fixed unexpected behaviour