Fix for repetitive code