resolve a bug about prototype init