Make sure thumbnail size is not negative.
Use more specific border: i.e. just for one side.