Updates main class to fix a weird problem with block calling