Unexpected behaviour From Object Prototype