Added preferences first behaviour. Unfinished