I added the tag and made you're question more readable. Not sure if it is necessary to write an answer but you might want to explain, what you mean by but then it doesn't work as expected.