Restored a little bit of optimization