fixed a problem with unpacking