diff --git a/src/create_surfaces.f90 b/src/create_surfaces.f90
index 1f4833b556818f4315a722786b644d468ab897df..fd05c7518bcad914ef75f53877f9fb2f4fb92bb7 100644
--- a/src/create_surfaces.f90
+++ b/src/create_surfaces.f90
@@ -560,7 +560,7 @@ select case(surface_type)
         ! sp03 is the amplitude
         ! sp04 is the phase
         do i=1,ns
-           z(i)=sp01+sp03*sin(x(i)*2.d0*pi/sp02+sp04)
+           z(i)=sp01+sp03*sin(2.d0*pi*(x(i)/sp02+sp04))
         end do
    case (7)
         ! a noisy surface, 
@@ -587,7 +587,7 @@ select case(surface_type)
         ! sp03 is the amplitude
         ! sp04 is the phase
         do i=1,ns
-           z(i)=sp01+sp03*cos(x(i)*2.d0*pi/sp02+sp04)
+           z(i)=sp01+sp03*cos(2.d0*pi*(x(i)/sp02+sp04))
         end do
    case (10)
         ! a 2D embankment