Bean instantiation issue fix