BUGFIX: corrected calculated gap