fix prototype object not created properly problem