Simplified to get rid of annoying warning