More beam fixes

 * Fix performance issues
 * Fix #2356