fixed implementation

Hey farid,
I think this pull request will fixed the way this component works ;)