Fix for offset problem