Better handling of the before() method

Signed-off-by: Fadion Dashi <jonidashi@gmail.com>