Fix fliker by checking validity of input.
Bump to 0.5.3