fix behaviour of put functionality