Habits and Environment
Its very difficult to stick to rewarding habits in an environment that is not conducive for producing them. The same applies for bad habits too. The stuff with bad habits is that, the neural pathways that are formed for producing them never fade away. They might look that they are absent but when you are introduced to that environment, the dopamine is secreted and the pathway is triggered. A habit that has been encoded in the mind is ready to be used whenever the relevant situation arises.