removed extraneous pound signs and made the component thread-safe