Optimization for #1240 by @macik