In reply to MadhanM:
If you are using a simulator on EDAplayground, it has a bug. Choose a different simulator.