Modified the getprop method.