Fixing theta detecting using esm.
Fixing input double in dlgs.