Some ugly code for autowireds