Fixed bug with clean beam calculation