Fixed BYTEMAN-259 and added test case