fixed very weird behaviour