Actually, I was searching for this. Since, I couldn't find a more nice way, I had to do it ugly.
Thanks for pointing this out.